#ifndef __DEMO_LOG_H__
#define __DEMO_LOG_H__

#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>

#define DEMO_LOG_TAG "DEMO_LOG"

#define DEMO_DEBUG_LOG_TAG 1

#define demo_debug(fmt, ...) do {                                                                               \
    if (DEMO_DEBUG_LOG_TAG)                                                                                     \
        printf("[" DEMO_LOG_TAG "][D] [%s:%s:%d] " fmt "\n", __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__);  \
} while (0)

#define demo_info(fmt, ...) printf("[" DEMO_LOG_TAG "][I][%s:%s:%d]: " fmt "\n", __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#define demo_err(fmt, ...) printf("[" DEMO_LOG_TAG "][E][%s:%s:%d]: " fmt "\n", __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)

#endif /* end of __DEMO_LOG_H__ */
